package org.charry.lib.config;

import org.charry.lib.config.impl.DatabaseConfig;
import org.charry.lib.config.impl.XMLConfig;

/**
 * Hello world!
 * 
 */
public class App {
	public static void main(String[] args) {
		// database
		Config config = new DatabaseConfig("apple", "SYSTEM_CONFIG");
		ConfigHelper.getInstance().attachConfigInstance(config);

		System.out.println(ConfigHelper.getInstance().getConfigInstance()
				.getConfig("bb"));

		System.out.println(ConfigHelper.getInstance().getConfigInstance()
				.getKonfig("bb").toInt());

		// xml
		Config configXML = new XMLConfig("config_database.xml");
		ConfigHelper.getInstance().attachConfigInstance(configXML);
		System.out.println(ConfigHelper.getInstance().getConfigInstance()
				.getConfig("database.apple.username"));
	}
}
